package com.study.design.pattern.pattern.behavioral.mediator;

import lombok.Getter;

/**
 * @Author: gongsl
 * @Date: 2025-03-25 21:45
 * @description: 抽象同事类
 */
@Getter
public abstract class User {
    /**
     * 中介者
     */
    protected ChatMediator mediator;
    /**
     * 姓名
     */
    protected String name;

    public User(ChatMediator mediator, String name) {
        this.mediator = mediator;
        this.name = name;
    }

    public abstract void sendMessage(String message);
    public abstract void receiveMessage(String message);
}
